#ifndef __PORT_H
#define __PORT_H

#include "sys.h"





#define IO1_ON		SET_PG2_L
#define IO2_ON		SET_PG3_L
#define IO3_ON		SET_PG1_L
#define IO4_ON		SET_PA2_L
#define IO5_ON		SET_PA3_L
#define IO6_ON		SET_PB0_L
#define IO7_ON		SET_PA0_L
#define IO8_ON		SET_PA1_L
#define IO9_ON		SET_PH2_L
#define IO10_ON		SET_PC6_L
#define IO11_ON		SET_PE0_L
#define IO12_ON		SET_PC7_L

#define IO1_OFF		SET_PG2_H
#define IO2_OFF		SET_PG3_H
#define IO3_OFF		SET_PG1_H
#define IO4_OFF		SET_PA2_H
#define IO5_OFF		SET_PA2_H
#define IO6_OFF		SET_PB0_H
#define IO7_OFF		SET_PA0_H
#define IO8_OFF		SET_PA1_H
#define IO9_OFF		SET_PH2_H
#define IO10_OFF	SET_PC6_H
#define IO11_OFF	SET_PE0_H
#define IO12_OFF	SET_PC7_H













#define REL_EN      1
#define IO_IN       1
#define LED_EN      1


#if (LED_EN)

#define LED_ON()			SET_PH4_L	
#define LED_OFF()			SET_PH4_H
#define LED_TURN()			(DATAH ^= 0x10)








#endif





#if (REL_EN == 1)

#define REL1_ON()			SET_PC0_H	
#define REL1_OFF()			SET_PC0_L

#define REL2_ON()			SET_PC2_H	
#define REL2_OFF()			SET_PC2_L

extern unsigned char Flag_REL1;
extern unsigned char Flag_REL2;

void REL_deal(void);

#endif





#if (IO_IN == 1)


void windows_check(void);

void Fan_check(void);


#endif



void port_init(void);

#endif

